#import "dfhgwhruebvhrheyslotcounter.h"
#import "dfhgwhruebvhrheygarbageequator.h"
@interface dfhgwhruebvhrheyslotcounter ()
@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UILabel *dateOneText;
@property (weak, nonatomic) IBOutlet UILabel *amountOneText;
@property (weak, nonatomic) IBOutlet UILabel *dateTwoText;
@property (weak, nonatomic) IBOutlet UILabel *amountTwoText;
@end
@implementation dfhgwhruebvhrheyslotcounter {
	void(^_callback)(void);
}
- (void)awakeFromNib {
	[super awakeFromNib];
	self.bgView.layer.cornerRadius = 20;
	self.bgView.layer.masksToBounds = YES;
	self.bgView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
}
- (void)bindRepayment:(dfhgwhruebvhrheygarbageequator *)model andRepayClick:(void(^)(void))callback {
	_callback = callback;
	self.dateOneText.text = [dfhgwhruebvhrheyoptionsaving formatTime:model.repay_time WithDateFormat:@"MM/dd/yyyy"];
	self.amountOneText.text = [NSString stringWithFormat:@"PHP %@", [[NSString stringWithFormat:@"%d",model.current_amount] dhgfywegwygeydwlocalitylearned]];
	self.dateTwoText.text = [dfhgwhruebvhrheyoptionsaving formatTime:[model.pay_data.back_time intValue] WithDateFormat:@"MM/dd/yyyy"];
	self.amountTwoText.text = [NSString stringWithFormat:@"PHP %@", [[NSString stringWithFormat:@"%d",model.pay_data.money] dhgfywegwygeydwlocalitylearned]];
}
- (IBAction)repayAction {
	[self removeFromSuperview];
	if (_callback) {
		_callback();
	}
}
- (IBAction)bgTapAction:(UITapGestureRecognizer *)sender {
	CGPoint point = [sender locationInView:sender.view];
	CGPoint point1 = [self convertPoint:point toView:self.bgView];
	if (!CGRectContainsPoint(self.bgView.bounds, point1)) {
		[self removeFromSuperview];
	}
}
@end
